package com.modbus.tool.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

/**
 * @Author: Leno
 * @Date: 2025-08-07
 * @Description:
 */
@Data
@TableName("data_point")
@Schema(name = "DataPoint对象", description = "数据点位定义表")
public class DataPoint implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer deviceId;

    @Schema(description = "数据点名称(如\"电压\")")
    private String pointName;

    @Schema(description = "数据类型: 0=INT16,1=UINT16,2=INT32,3=UINT32,4=FLOAT32,5=FLOAT64,6=STRING")
    private Byte dataType;

    @Schema(description = "字节顺序: 0=ABCD(大端),1=CDAB,2=BADC,3=DCBA(小端)")
    private Byte byteOrder;

    @Schema(description = "工程值转换系数")
    private Double scaleFactor;

    @Schema(description = "工程值转换偏移量")
    private Double offset;

    @Schema(description = "寄存器地址偏移量")
    private Short addressOffset;


}

